﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 状态模式_应用实例2
{
    class Work
    {
        public int Hour;
        State current;

        public Work(int Hour)
        {
            this.Hour = Hour;
            current = new ForenoonState();
        }

        public void Working()
        {
            current.Working(this);
        }

        public void Set(State s)
        {
            current = s;
        }
    }
}
